#ifndef BOARD_MANAGER_H
#define BOARD_MANAGER_H

#include "board.h"
#include "ConfigManager.h"
#include <vector>
#include <memory>

class BoardManager {
private:
    std::vector<std::unique_ptr<Board>> boards;
    int maxBoards;
    double lastBoardTime;
    int boardFrequency;
    GameConfig config;

    std::unique_ptr<Board> CreateBoard(float x, float y, const GameConfig& config);
    std::unique_ptr<Board> CreateBoardOfType(const std::string& type, float x, float y, const GameConfig& config); // 添加新方法

public:
    BoardManager(); // 添加默认构造函数
    void Init(const GameConfig& gameConfig);
    void Update();
    void Draw();
    void SetFrequency(int frequency);
    std::vector<Board*> GetActiveBoards();
    void ResetBoards();
};

#endif // BOARD_MANAGER_H